<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<c:set var="path" value="${pageContext.request.contextPath }" />
<!doctype html>
<html class="no-js" lang="en">

<head>
<meta charset="utf-8">
<title>主页</title>

<link rel="stylesheet" href="${path }/assets/css/bootstrap.min.css">
<link rel="stylesheet" href="${path }/assets/css/ie7.css">
<link rel="stylesheet" href="${path }/assets/css/style.css">
<link rel="stylesheet" href="${path }/assets/css/font-awesome.min.css">
<link rel="stylesheet" href="${path }/assets/css/plugins.css">
</head>

<body style="background: url(assets/img/bg/7.png)">

	<header class="header-area header-sticky">
		<div class="header-container">
			<div class="row">
				<div class="col-lg-5 display-none-md display-none-xs">
					<div class="ht-main-menu">
						<nav>
							<ul>
								<li class="active"><a href="productIndex">首页</a></li>
								<li><a href="productlist">水果展览</a></li>
								<li><a href="fruit.jsp">水果文化</a>
								</li>
								<li><a href="commentlist">精选评论</a></li>
								<li><a href="shopping.jsp">购物车</a></li>
								<li><a href="personalServlet">个人信息</a></li>
							</ul>
						</nav>
					</div>
				</div>

				<div class="col-lg-5 col-sm-8">
					<div class="header-content d-flex justify-content-end">
						<div class="search" style="background: url(assets/img/bg/11.jpg);">
							<div class="search_form">
								<form action="${path }/Search" method="get">
									<input type="text" name="searchWord" placeholder="&nbsp;&nbsp;&nbsp;你要搜寻的商品..."  style="background:url(assets/img/bg/11.jpg);width: 150px;height:34px; border: 1px solid #aaa;">
									<input type="submit" value="搜索" style="background:url(assets/img/bg/11.jpg);width: 50px;height: 34px;text-align: center;
									">
								</form>
							</div>
						</div>

						<div class="settings-wrapper">
							<a style="width: 90px; font-size: 12px;">欢迎您,<i>${username.username }</i></a>
						</div>

						<div class="settings-wrapper">
							<a href="login.jsp">
								<input style="position: absolute; border: none;width: 70px;height: 40px;font-size: 12px;color: orangered; background: url(assets/img/bg/11.jpg);" type="submit" name="" value="点击退出" />
							</a>
						</div>
					</div>
				</div>
			</div>
		</div>
	</header>


	<div class="product-area bg-1 pt-110 pb-80">
		<div class="container">
			<div class="section-title text-center">
				<div class="section-img d-flex justify-content-center">
					<img src="assets/img/icon/title.png" alt="">
				</div>
				<h2>
					<span>美味</span>水果 精选
				</h2>
			</div>
		</div>
		<div class="container">
			<div class="product-tab-list nav" role="tablist">
				<a class="active" href="#tab1" data-toggle="tab" role="tab"
					aria-selected="true" aria-controls="tab1">商品展示</a>
			</div>
			<div class="tab-content text-center">
				<div class="tab-pane active show fade" id="tab1" role="tabpanel">
					<div class="product-carousel">

						<c:forEach items="${products}" var="p">
							<div class="custom-col">
								<div class="single-product-item">
									<div class="product-image">
										<a href="product?id=${p.id }"> <img
											src="${path }/assets/img/product/${p.listimg }" alt="">
										</a>
										<div class="product-hover">
											<a href="Cartindex?productId=${p.id }">
												<button type="button" class="p-cart-btn">加入购物车</button>
											</a>
										</div>
									</div>
									<div class="product-text">
										<div class="product-rating">
											<i class="fa fa-star-o color"></i> <i
												class="fa fa-star-o color"></i> <i
												class="fa fa-star-o color"></i> <i class="fa fa-star-o"></i>
											<i class="fa fa-star-o"></i>
										</div>
										<h5>
											<a href="shop.html">${p.name }</a>
										</h5>
										<div class="pro-price">
											<span class="new-price">￥${p.price}</span>
										</div>
									</div>
								</div>
							</div>
						</c:forEach>
					</div>
				</div>
			</div>
		</div>
	</div>
	<script type="text/javascript">
		var msg = '${msg}'

		if (msg != null && msg != '') {
			alert(msg);
		} else {

		}
	</script>



	<script src="${path }/assets/js/vendor/jquery-3.2.1.min.js"></script>
	<script src="${path }/assets/js/bootstrap.min.js"></script>
	<script src="${path }/assets/js/plugins.js"></script>
	<script src="${path }/assets/js/ajax-mail.js"></script>
	<script src="${path }/assets/js/main.js"></script>
</body>

</html>